package main

import (
	"fmt"
)

func main() {

	fmt.Println("start")
	var channel chan int = make(chan int, 2)

	go func() {

		for i := 0; i <= 10; i++ {
			fmt.Println(i)
		}
		channel <- 1
	}()

	go func() {

		for i := 'a'; i <= 'z'; i++ {
			fmt.Printf("%c\n", i)
		}
		channel <- 2
	}()
	for i := 0; i < 2; i++ {
		<-channel
	}

	fmt.Println("end")

}
